package com.own.business.dingtalk.gov.entity.map;

import com.own.business.dingtalk.gov.entity.po.DingTalkGovUser;
import com.own.component.common.base.entity.BaseMap;
import com.own.constant.ConstantBeanSuffix;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.NonNull;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * DingTalkGovUserMapVo
 *
 * @author chenxueli
 * @date 2023-07-02 13:11:36
 */
@Schema(title = "政务钉钉用户" + ConstantBeanSuffix.MAP_VO)
@Getter
@Setter
@ToString
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
public class DingTalkGovUserMapVo extends BaseMap<DingTalkGovUser> implements Serializable {

    @Schema(title = "账号名")
    private String account;

    @Schema(title = "账号id")
    private Long accountId;

    @Schema(title = "应用名")
    private String clientId;

    @Schema(title = "租户下人员编码")
    private String employeeCode;

    @Schema(title = "姓名")
    private String lastName;

    @Schema(title = "账号类型")
    private String namespace;

    @Schema(title = "昵称")
    private String nickNameCn;

    @Schema(title = "租户id")
    private Long realmId;

    @Schema(title = "租户名称")
    private String realmName;

    @Schema(title = "租户+用户唯一标识")
    private String tenantUserId;

    @Schema(title = "应用+用户唯一标识")
    private String openid;

    /**
     * 构造方法
     *
     * @param entity 原对象
     */
    public DingTalkGovUserMapVo(@NonNull DingTalkGovUser entity) {
        super(entity);
        this.account = entity.getAccount();
        this.accountId = entity.getAccountId();
        this.clientId = entity.getClientId();
        this.employeeCode = entity.getEmployeeCode();
        this.lastName = entity.getLastName();
        this.namespace = entity.getNamespace();
        this.nickNameCn = entity.getNickNameCn();
        this.realmId = entity.getRealmId();
        this.realmName = entity.getRealmName();
        this.tenantUserId = entity.getTenantUserId();
        this.openid = entity.getOpenid();
    }
}
